"============
" Key bindings
"============

let mapleader=" "

nnoremap <silent> <F1> :wa<CR>:b#<CR>
nnoremap <silent> <F2> :wa<CR>:bp<CR>
nnoremap <silent> <F3> :wa<CR>:bn<CR>
nnoremap <silent> <F4> :wa<CR>
inoremap <silent> <F1> <ESC>
inoremap <silent> <F2> <ESC>:wa<CR>:bp<CR>
inoremap <silent> <F3> <ESC>:wa<CR>:bn<CR>
inoremap <silent> <F4> <ESC>:wa<CR>

nnoremap <F5> :AsyncTasks project-build project-run<CR>
nnoremap <F6> :AsyncTask project-build<CR>
nnoremap <F7> :AsyncTasks file-build file-run<CR>
nnoremap <F8> :AsyncTask project-config<CR>



"" noremap w k
"" noremap s j
"" noremap a h
"" noremap d l
"" noremap W 5k
"" noremap S 5j
"" noremap A 5h
"" noremap D 5l
"" 
"" noremap e i
"" noremap r a
"" noremap E I
"" noremap R A
"" noremap h w
"" noremap c d
"" noremap j c
"" noremap m r
"" noremap ; :
"" inoremap jj <esc>
"" 
"" noremap = nzz
"" noremap - Nzz
"" noremap <LEADER><CR> :nohlsearch<CR>
"
""map <C-s> :w<CR>
""map <C-q> :q<CR>
""map Q :wq<CR>
""map <A-q> :qa<CR>
"" map k <nop>
"" map l <nop>
"
"map <LEADER>/ :vsplit<CR>
"map <LEADER>- :split<CR>
"
"map <F1> :edit ~/.vim/core/core.vim<CR>
"" map <F2> :source ~/.vimrc <CR>
"map <F3> :PlugInstall<CR>
"map <F4> :PlugUpdate<CR>
"
"" map <A-d> <C-w>l
"" map <A-w> <C-w>k
"" map <A-a> <C-w>h
"" map <A-s> <C-w>j
"
"noremap tn :tabe<CR>
"noremap ta :-tabnext<CR>
"noremap td :+tabnext<CR>
"
"" noremap lg :FloatermNew lazygit<CR>
"noremap wm :NERDTreeToggle<CR>
"
"" map <LEADER>sc :set spell!<CR>
"" map <LEADER><LEADER> <ESC>/<++><CR>:nohlsearch<CR>j4d
"" 
"" vnoremap <C-c> "+y
